﻿<%@ Page Language="C#" AutoEventWireup="true" MasterPageFile="~/Areas/SystemAdmin/Master.Master" CodeBehind="ConfigDNSEmail.aspx.cs" Inherits="OnlineBusinesses.Areas.SystemAdmin.ConfigDNSEmail" %>
<asp:Content ContentPlaceHolderID="ContentSystemAdmin" runat="server" ID="ContentAdmin">
<div class="col-md-12 col-xs-12 col-lg-12 col-sm-12" style="padding:10px;padding-bottom:0px;">
        <h3>Cài đặt hệ thống
            <button type="button" class="btn btn-default pull-right hidden-xs hidden-sm" style="margin-right:20px;border-radius:0px;border:1px solid #ddd;padding-top:10px;" value="Back" onclick="history.go(-1);">
                <span class="fa fa-mail-reply" style="font-size:20px;"></span>
            </button>
        </h3>
        <div class="col-md-12 col-xs-12 col-lg-12 col-sm-12" style="padding:10px;">
            <div class="col-md-3 col-xs-12 col-lg-3 col-sm-12" style="padding:10px;text-align:center;">
                <div class="col-md-12 col-xs-12 col-lg-12 col-sm-12" style="padding:10px;">
                    <a href="Config.aspx" style="text-decoration:none;color:#333;">
                        <span class="btn btn-default" style="width:100%;border-radius:0px;">Hạn ngạch gửi mail</span> 
                    </a>
                </div>
            </div>
            <div class="col-md-3 col-xs-12 col-lg-3 col-sm-12" style="padding:10px;text-align:center;">
                <div class="col-md-12 col-xs-12 col-lg-12 col-sm-12" style="padding:10px;">
                    <a href="ConfigSPAM.aspx" style="text-decoration:none;color:#333;">
                        <span class="btn btn-default" style="width:100%;border-radius:0px;">Quản lý từ khóa</span> 
                    </a>
                </div>
            </div>
            <div class="col-md-3 col-xs-12 col-lg-3 col-sm-12" style="padding:10px;text-align:center;">
                <div class="col-md-12 col-xs-12 col-lg-12 col-sm-12" style="padding:10px;">
                    <a href="ConfigHTML.aspx" style="text-decoration:none;color:#333;">
                        <span class="btn btn-default" style="width:100%;border-radius:0px;">Quản lý HTML Tiêu chuẩn</span> 
                    </a>
                </div>
            </div>
            
            <div class="col-md-3 col-xs-12 col-lg-3 col-sm-12" style="padding:10px;text-align:center;">
                <div class="col-md-12 col-xs-12 col-lg-12 col-sm-12" style="padding:10px;">
                        <span style="width:100%;font-weight:bold;line-height:34px;">Quản lý cấu hình Email</span> 
                </div>
            </div>
        </div>
    </div>
    <div class="col-md-12 col-xs-12 col-lg-12 col-sm-12" style="padding:0px;height:1px;background:#ddd;margin:0px 0px 10px;"></div>

    <div class="col-md-12 col-xs-12 col-lg-12 col-sm-12" style="padding:0px;">
        <script type="text/javascript">
            $(document).ready(function () {
                // prepare the data
                var data = new Array();
                var danhsachs =
                [
                    "Nguyễn Văn A", "Nguyễn Văn B", "Tạ Hiểu Phong","Mao Trạch Đông"
                ];
                var dichvus =
                [
                    "Email001@gmail.com", "Email002@gmail.com", "Email003@gmail.com", "Email004@gmail.com"
                ];
                var hoatdongs =
                [
                    "Bình thường"
                ];
                var tinhtrangs =
                [
                    "Đã đăng ký", "Chưa đăng ký", "Đã đăng ký"
                ];
                for (var i = 0; i < 50; i++) {
                    var row = {};

                    row["danhsach"] = danhsachs[Math.floor(Math.random() * danhsachs.length)];
                    row["dichvu"] = dichvus[Math.floor(Math.random() * dichvus.length)];
                    row["hoatdong"] = hoatdongs[Math.floor(Math.random() * hoatdongs.length)];
                    row["tinhtrang"] = tinhtrangs[Math.floor(Math.random() * tinhtrangs.length)];

                    data[i] = row;
                }
                var source =
                {
                    localdata: data,
                    datatype: "array",
                    datafields:
                    [
                        { name: 'danhsach', type: 'string' },
                        { name: 'dichvu', type: 'string' },
                        { name: 'hoatdong', type: 'string' },
                        { name: 'tinhtrang', type: 'string' }
                    ]
                };
                var dataAdapter = new $.jqx.dataAdapter(source);

                $("#jqxgrid").jqxGrid(
                {
                    width: $("#jqxgrid").width(),
                    source: dataAdapter,
                    pageable: true,
                    autoheight: true,
                    sortable: true,
                    selectionmode: 'multiplecellsadvanced',

                    columnsresize: true,
                    columns: [
                      { text: 'Tên cấu hình', dataField: 'danhsach' },
                      { text: 'Email gửi', dataField: 'dichvu' },
                      { text: 'Trạng thái', dataField: 'tinhtrang',width:120 },
                      {
                          text: 'Lấy cấu hình DNS', width: 150, cellsalign: 'center', cellsrenderer: function () {
                              return "<a href='ViewDNDDetail.aspx?uid=" + 1 + "' style='color:#333;text-decoration:none;margin-left:38%;' >Xem</a>";
                          }
                      },
                      { text: 'Trạng thái cấu hình', dataField: 'hoatdong' ,width:150},
                      {
                          text: 'Xóa',  columntype: 'button', cellsrenderer: function () {
                              return "Xóa";
                          }
                      }
                    ]
                });
            });
        </script>
        <h3 style="font-weight:bold;">Quản lý cấu hình DNS
        </h3>
        <div class="col-md-12 col-xs-12 col-lg-12 col-sm-12" style="padding:10px;">
            <div class="col-md-3 col-xs-12 col-lg-3 col-sm-12" style="padding:5px;">
                <div class="col-md-4 col-xs-12 col-lg-4 col-sm-12" style="padding:0px;line-height:34px;">Tìm kiếm</div>
                <div class="col-md-8 col-xs-12 col-lg-8 col-sm-12" style="padding:0px;"><input class="input_add" placeholder="Theo tên.." /></div>
            </div>
            <div class="col-md-4 col-xs-12 col-lg-4 col-sm-12" style="padding:5px;">
                <div class="col-md-4 col-xs-12 col-lg-4 col-sm-12" style="padding:0px;line-height:34px;">Trạng thái đăng ký</div>
                <div class="col-md-8 col-xs-12 col-lg-8 col-sm-12" style="padding:0px;">
                    <select class="input_add">
                        <option selected>Tất cả</option>
                        <option>Chưa đăng ký</option>
                        <option>Đã đăng ký</option>
                    </select>
                </div>
            </div>
            <div class="col-md-3 col-xs-12 col-lg-3 col-sm-12" style="padding:5px;">
                <div class="col-md-4 col-xs-12 col-lg-4 col-sm-12" style="padding:0px;line-height:34px;">Cấu hình</div>
                <div class="col-md-8 col-xs-12 col-lg-8 col-sm-12" style="padding:0px;">
                    <select class="input_add">
                        <option selected>Tất cả</option>
                        <option>Bình thường</option>
                        <option>Lỗi</option>
                    </select>
                </div>
            </div>
            <div class="col-md-2 col-xs-12 col-lg-2 col-sm-12" style="text-align:right;padding:5px;">
                <span class="btn btn-default" style="width:100%;border-radius:0px;background:#00d;color:#fff;font-weight:bold;">Tìm kiếm</span>
            </div>
        </div>
        <div class="col-md-12 col-xs-12 col-lg-12 col-sm-12" style="padding:0px;margin:10px 0px;height:1px;background:#ddd;"></div>
        <div id='jqxWidget' class="col-md-12 col-xs-12 col-lg-12 col-sm-12" style="padding:10px;">
            <div id="jqxgrid"></div>
        </div>
    </div>
</asp:Content>